package com.chahua.organized.service;

import com.chahua.organized.common.PageData;
import com.chahua.organized.qo.DepartmentMemberMoveQo;
import com.chahua.organized.qo.DepartmentMemberPageQo;
import com.chahua.organized.qo.DepartmentMemberQo;
import com.chahua.organized.vo.DepartmentMemberInfoVo;
import com.chahua.organized.vo.DepartmentMemberInputVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;


public interface DepartmentMemberService {

    /**
     * 添加成员
     *
     * @param departmentMemberQo 数据
     */
    void add(DepartmentMemberQo departmentMemberQo);

    /**
     * 查询成员信息
     *
     * @param id 主键
     * @return DepartmentMemberInfoVo
     */
    DepartmentMemberInfoVo getMemberById(Integer id);

    /**
     * 更改成员信息
     * @param id 主键
     * @param departmentMemberQo 数据
     */
    void updateMemberById(Integer id, DepartmentMemberQo departmentMemberQo);

    /**
     * 分页查询成员列表
     * @param departmentMemberPageQo 查询条件
     * @return PageData<DepartmentMemberVo>
     */
    PageData<DepartmentMemberInfoVo> listWithPage(DepartmentMemberPageQo departmentMemberPageQo);

    /**
     * 批量删除成员
     * @param memberIds 成员ids
     * @return int
     */
    void delete(List<Integer> memberIds);

    /**
     * 批量移动成员
     * @param departmentMemberMoveQo 数据
     */
    void move(DepartmentMemberMoveQo departmentMemberMoveQo);

    /**
     * 下载execl模板
     */
    void download(HttpServletResponse response, HttpServletRequest request) throws IOException;

    /**
     * excel导入人员信息
     * @param multipartFile excel文件
     */
    DepartmentMemberInputVo importMember(MultipartFile multipartFile, HttpServletResponse resp);

}
